//
//  PAFeedbackViewController.m
//  PAMobileWallet
//
//  Created by shen pu on 13-7-18.
//  Copyright (c) 2013年 平安付. All rights reserved.
//

#import "PAFeedbackViewController.h"
#import "PANavView.h"
#import "PAFeedbackView.h"

@interface PAFeedbackViewController ()

@end

@implementation PAFeedbackViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self)
    {
        //feedbackView = [[PAFeedbackView alloc] initWithFrame:RECT_PHONE];
        feedbackView = [[PAFeedbackView alloc] initWithFrame:CGRectMake(0, 20, WIDTH_PHONE, HEIGHT_CURRENT)];
        feedbackView.parentController = self;
        feedbackView.backgroundColor = BGVIEW_COLOR;
        self.view = feedbackView;

        navView = [[PANavView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 44)];
        navView.delegate = self;
        [navView setTitle:@"意见反馈"];
        [feedbackView addSubview:navView];
    }
    return self;
}

#pragma mark - PANavViewDelegate methods

- (void)sendSelf:(PANavView *)sendView
{
    [self.navigationController popViewControllerAnimated:YES];
    [self.view removeFromSuperview];
}

- (void)testNext:(id)sender
{
    UIButton * receivebButton = (UIButton *)sender;
    if (receivebButton.tag == 0)
    {
        //[self.navigationController popViewControllerAnimated:YES];
        [self.view removeFromSuperview];
    }
}

- (void)viewWillAppear:(BOOL)animated
{
    feedbackView.feedbackTF.text = @"";
    feedbackView.feedbackTV.text = @"";
}

- (void)viewDidLoad
{
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

@end
